home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.lang.java
- Path: netcom.com!milod
- From: milod@netcom.com (John DiCamillo)
- Subject: Re: Java: What's the Big Deal?
- Message-ID: <milodDoF9JF.K32@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- References: <4i40ik$9dt@news4.digex.net> <milodDo5yDE.H8B@netcom.com> <4if9jc$rkm@druid.borland.com>
- Date: Sun, 17 Mar 1996 17:21:15 GMT
- Sender: milod@netcom16.netcom.com
-
- pete@borland.com (Pete Becker) writes:
- >In article <milodDo5yDE.H8B@netcom.com>, milod@netcom.com says...
- >>ell@access1.digex.net (Ell) writes:
- >>>What is you can do in Java, you can't do as easily with a library in C++?
- >>
- >>Write applets the run on the Web (duh! :-) Folklore has it
- >>that Sun couldn't even interest anyone in Oak until the
- >>applet idea came around. Suddenly, everybody wants some.
-
- >There's no reason you can't write a C++ compiler that generates a Java
- >bytestream.
-
- Are you claiming that arbitrary, correct (ANSI) C++ code can
- be compiled to the JVM and continue to work correctly? Or are
- you claiming that a compiler can be written that will translate
- some limited subset of C++ into JVM?
-
- And even if it is the former, given the limitations of the JVM,
- I suspect that the performance characteristics of the resulting
- program might be unrecognizable to the author.
-
- >>Other merely practical advantages (for certain kinds of apps)
- >>include:
- >>
- >>1) Trade speed for safety (no pointer arithmetic + GC +
- >> all casts dynamically checked + array bounds + ...)
- >> This makes it a bit easier to program in than C++.
-
- >Huh? Why can't you make these tradeoffs in C++? In fact, the problem is just
- >the opposite: you can't make these tradeoffs in Java because it does not let
- >you use pointers or handle your own memory management. This means you cannot
- >decide that speed is more important than safety.
-
- Right, which was exactly my point. The tradeoff has already
- been made by the language in the right direction for certain
- kinds of apps. Thus, there is less work for the programmer,
- *assuming that you agree with the tradeoff*.
-
- >>2) No header files => faster compilation
-
- >Nonsense. Header files are simply text that gets included where you want it. If
- >you write the same code without header files it will not magically compile
- >faster.
-
- It's not nonsense. Cascaded #includes result in such a
- drastic inflation of the source text that it makes a measurable
- increase in compilation time.
-
- >>3) Slightly simpler syntax (mostly due to the lack of
- >> address operators, function pointers, and templates)
-
- >Yup. The question, of course, is what this does to the expressive power of the
- >language.
-
- That's strange, I thought the question was "what can you do
- in Java that you can't do in C++", not the other way around.
- And, as I said, points 1 through 4 are practical advantages,
- not critical differences.
-
- In any case, no one can answer your question until you define
- what you mean by "expressive power".
-
-
- --
- ciao,
- milo
- ================================================================
- John DiCamillo Fiery the Angels Fell
- milod@netcom.com Deep thunder rode around their shores
-